<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ page trimDirectiveWhitespaces="true" %>
<!DOCTYPE html>
<html lang="ko">
	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"/>
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<title>파싱해서 DB에 입력할 상품</title>

		<!-- 모바일 웹 페이지 설정 -->
		<link rel="shortcut icon" href="assets/ico/favicon.png" />
		<link rel="apple-touch-icon-precomposed" href="assets/ico/apple-touch-icon-57-precomposed.png" />
		<link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/ico/apple-touch-icon-72-precomposed.png" />
		<link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/ico/apple-touch-icon-114-precomposed.png" />
		<link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/ico/apple-touch-icon-144-precomposed.png" />

		<!-- bootstrap -->
		<link rel="stylesheet" type="text/css" href="assets/css/bootstrap.min.css" />
		<!-- Top makes css file -->
		<link rel="stylesheet" type="text/css" href="assets/css/topCommon.css" />
		<!-- 나눔고딕 웹 폰트 적용 -->
		<link rel="stylesheet" type="text/css" href="assets/css/nanumfont.css" />
		<!-- 반응형 웹을 지원하지 않을 경우 -->
		<!-- <link rel="stylesheet" href="assets/css/non-responsive.css" /> -->

		<!-- IE8 이하 버전 지원 -->
		<!--[if lt IE 9]>
		<script type="text/javascript" src="assets/js/html5shiv.js"></script>
		<script type="text/javascript" src="assets/js/respond.min.js"></script>
		<![endif]-->

		<!-- IE10 반응형 웹 버그 보완 -->
		<!--[if gt IE 9]>
		<link rel="stylesheet" type="text/css" href="assets/css/ie10.css" />
		<script type="text/javascript" src="assets/js/ie10.js"></script>
		<![endif]-->
	</head>

	<body>
		<div class="container">
        	<div class="page-header">
        		<h1>상품이름 입력</h1>
        	</div>
        	
        	<a href="adminMypage.jsp"><input type="button" class="top-btn-custom" value="관리자페이지 바로가기"></a>
			<br />
        	
        	<form id="frmProduct" class="form-horizontal" role="form"
        	method="post" action="aPruductSearchOk.jsp">        	
        		<fieldset>
        			<!--  입력양식 -->
        			<div class="form-group">
        				<label for="product" class="col-md-2 control-label">입력할 상품</label>
        				<div class="col-md-10">
        					<input type="text" class="form-control"
        					id = "product" placeholder="입력할 상품을 입력하세요."
        					name="product">
        				</div>
        			</div>
        			<!--//입력양식  -->
        			<!--  입력양식 -->
        			<div class="form-group">
        				<label for="itemNum" class="col-md-2 control-label">출력할 갯수</label>
        				<div class="col-md-10">
        					<input type="text" class="form-control"
        					id = "itemNum" placeholder="최대값 20까지만 가능합니다."
        					name="itemNum">
        				</div>
        			</div>
        			<!--//입력양식  -->
        			<div class="form-group">
        				<div class="col-md-offset-2 col-md-10">
        					<div class="row">
        						<div class="col-md-6">
        							<button type="submit" class="btn btn-primary
        							 btn-block">전송</button>
        						</div>
        						<div class="col-md-6">
        							<button type="reset" class="btn btn-warning
        							 btn-block">다시작성</button>
        						</div>
        					</div>
        				</div>
        			</div>
        		</fieldset>
        	</form>        	
        </div>		
		<!-- Javascript -->
		<script src="assets/js/jquery.js"></script>
		<script src="assets/js/bootstrap.min.js"></script>
		<!-- 형식검사 클래스 참조 -->
		<script src="assets/js/string.js"></script>
		<script type="text/javascript">
		$(function() {
			$("#frmProduct").submit(function() {					
				// 아이디 입력여부 검사
				if (!$("input[name='product']").val().isValue()) {
					alert("상품를 입력하세요.");
					$("input[name='product']").focus();
					return false;
				}
		
				// 패스워드 입력여부 검사
				if (!$("input[name='itemNum']").val().isValue()) {
					alert("상품 갯수를 입력하세요.");
					$("input[name='itemNum']").focus();
					return false;
				}
			});				
		});
	</script>
	</body>
</html>